<template>
  <Header />
  <div class="container">
    <el-input
      style="min-width: 500px"
      v-model="input1"
      placeholder="请输入参数"
      type="text"
    >
      <template #append>
        <el-button type="primary" @click="updateparam"><span class="text">修改参数</span></el-button>
      </template>
    </el-input>
  </div>
  <Footer />
</template>
<script setup >
import { ref } from "vue";
import axios from "axios";
import Header from "@/components/Header.vue";
import Footer from "@/components/Footer.vue";
const input1 = ref("");
const updateparam = async () => {
  const data = {
    params: input1.value,
  };

  // 使用axios发送POST请求
  const rev = await axios.post("/updateparam", data);
  console.log(rev);
};
</script>

<style scoped>
.container {
  display: flex;
  max-width: 600px;
  margin: auto;
  justify-content: center;
  align-items: center;
  height: 90vh; 
}
.text{
  font-size: 16px;
  color: rgb(11, 129, 0);
  font-weight: bold;
}
</style>